home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C / Code Resources / Jims CDEFs 1.50 / CDEF Source / source / cdefGBox.h < prev    next >
Encoding:
Text File  |  1995-11-08  |  1.6 KB  |  42 lines  |  [TEXT/KAHL]

  1. //------------------------- © 1991-1995 by James G. Stout --------------------------
  2. // File        : cdefGBox.h
  3. // Date        : September 1,1991
  4. // Author    : Jim Stout
  5. //             :
  6. // Purpose    : "Group Box" CDEF
  7. //             : A very simple CDEF that draws a titled box. It supports
  8. //             : 3 varCodes - see below
  9. //             :
  10. //             : use procID :   100 * 16 + varCode 
  11. //             :      when calling NewControl() or in your resource template.
  12. //----------------------------------------------------------------------------------
  13.  
  14. //----------------------------------------------------------------------------------
  15. // variation codes
  16. //----------------------------------------------------------------------------------
  17.  
  18. #define    grayLine        0x0001    // draw box with a dotted line (gray pattern)
  19. #define ctl3D            0x0002    // draw a 3D box with overlapping white & black boxes
  20. #define insetBox        0x0004    // draw a 3D box with white & gray
  21. #ifndef useWindFont
  22. #define    useWindFont        0x0008    
  23. #endif
  24.  
  25. //----------------------------------------------------------------------------------
  26. // CDEF private data
  27. //----------------------------------------------------------------------------------
  28. typedef struct {
  29. Rect    titleRect;                // title rect to clear so font changes are correct
  30. short    realHt;                    // true height of the control
  31. short    txFont;
  32. short    txSize;
  33. }gbData,**gbDataHandle;
  34.  
  35. //----------------------------------------------------------------------------------
  36. //    Function prototypes
  37. //----------------------------------------------------------------------------------
  38.  
  39. void doDraw                (ControlHandle hCtl, short varCode);
  40. pascal void drawControl (short depth, short dFlags, 
  41.                         GDHandle theDevice, long userData);
  42.